package com.bestcem.xm.qdes.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bestcem.xm.component.mybatis.base.ResultPage;
import com.bestcem.xm.component.mybatis.service.IXmService;
import com.bestcem.xm.qdes.controller.param.QuestionLibPageParam;
import com.bestcem.xm.qdes.controller.param.QuestionLibProjectParam;
import com.bestcem.xm.qdes.controller.param.QuestionLibSaveAndCopyParam;
import com.bestcem.xm.qdes.controller.param.QuestionLibSetTagParam;
import com.bestcem.xm.qdes.controller.vo.*;
import com.bestcem.xm.qdes.entity.QdesProjectEntry;
import com.bestcem.xm.qdes.entity.QdesQuestionLib;

import java.util.List;

public interface QdesQuestionLibService extends IXmService<QdesQuestionLib> {
    /**
     * 题目库列表分页查询
     *
     * @param page
     * @param pageParam
     * @return
     */
    ResultPage<QdesQuestionlibVo> questionlibPageQuery(Page<?> page, QuestionLibPageParam pageParam);

    List<QdesQuestionlibVo> questionlibQuery(QuestionLibPageParam pageParam);

    /**
     * 题目库-题目模板保存和复制接口
     *
     * @param param
     */
    void questionlibSaveAndCopy(QuestionLibSaveAndCopyParam param);

    /**
     * 题目库-题目模板设置标签
     *
     * @param id
     * @param param
     */
    void questionlibSetTag(String id, QuestionLibSetTagParam param);

    /**
     * 题目库-题目模板删除
     *
     * @param id
     * @return
     */
    DeletedCountVo questionlibDelete(String id);

    /**
     * 查询问卷项目简要信息
     *
     * @param param
     * @return
     */
    List<QuestionLibProjectVo> projectsSumary(QuestionLibProjectParam param);

    QuestionLibProjectHomeVo projects(Page<QdesProjectEntry> page, QuestionLibProjectParam param);

    /**
     * 题目库-添加模板-问卷项目选中后详情查询
     *
     * @param id
     * @return
     */
    QuestionLibProjectDetailVo projectsDetail(String id);

    /**
     * 这里是根据项目编号查题目详情
     *
     * @param id
     * @param withQ
     * @param timeMap
     * @return
     */
    QstructsDetailVo qstructsDetail(String id, String withQ, String timeMap);

    /**
     * 获取题目
     *
     * @param structId structId
     * @param qstructsData qstructsData
     * @return 数据
     */
    String fillDataQuestions(String structId, String qstructsData);

}
